﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CMSModel
{
    /// <summary>
    /// 投票
    /// </summary>
    public class Voting
    {
        /// <summary>
        /// 编号
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }
        /// <summary>
        /// 发布者编号
        /// </summary>
        public int UserId { get; set; }
        /// <summary>
        /// 发布者
        /// </summary>
        public virtual User User { get; set; }
        /// <summary>
        /// 发布时间
        /// </summary>
        public DateTime Pdate { get; set; }
        /// <summary>
        /// 所有投票总计
        /// </summary>
        public int AllVotes { get; set; }
        /// <summary>
        /// 文章编号
        /// </summary>
        public int DocId { get; set; }
        /// <summary>
        /// 文章
        /// </summary>
        public virtual Doc Doc { get; set; }

        public Voting()
        {
            this.AllVotes = int.MinValue;
            this.DocId = int.MinValue;
            this.Id = int.MinValue;
            this.UserId = int.MinValue;
        }
    }
}
